package com.zzty.train.pjm.serviceImpl;


import com.zzty.train.pjm.dao.TeanExamMapper;
import com.zzty.train.pjm.entity.Question;
import com.zzty.train.pjm.entity.TeamExam;
import com.zzty.train.pjm.service.QuestionService;
import com.zzty.train.pjm.util.PageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class QuestionServiceImpl implements QuestionService {
    @Autowired
    TeanExamMapper teanExamMapper;
    @Override
    public List<Question>getQuestion(){
        List<Question>questions=teanExamMapper.getQuestion();
        return questions;
    }
    @Override
    public Integer getQuestionCount(){
        Integer count = teanExamMapper.getQuestionCount();
        return count;
    }
    @Override
    public List<Question>getPageQuestion(PageUtils pageUtils){
        List<Question>getPageQuestion=teanExamMapper.getPageQuestion(pageUtils);
        return getPageQuestion;
    }

    @Override
    public Integer addQuestion(Question question){
        Integer count=teanExamMapper.addQuestion(question);
        return count;
    }
    @Override
    public Integer submitQuestion(TeamExam teamExam){
        Integer count=teanExamMapper.submitQuestion(teamExam);
        return count;
    }
}
